$(function () {
    $("#btn5").click(function () {
        //获取输入框的值
        var dd = $("#txt3").val()

        $.ajax({
            url:"/get_data",
            data:{"tt": dd},
            type:"post",
            success:function (data) {

                console.log(data);
                var arr = data.split("。");
                var length=arr.length;
                var html="";
                for(var i=0;i<length-1;i++){
                    html+=arr[i]+"。"+"<br>";
                }
                html+=arr[length-1];
                $("#text1").html(html);
            },
            error:function () {

            }
        })
    })
    $("#btn2").click(function (){
        var aa = $("#txt1").val()
         $.ajax({
            url:"/post_keyword",
            data:{"keyword": aa},
            type:"post",
            success:function (data) {
                console.log(data)
var arr = data.split("。");
                var length=arr.length;
                var html="";
                for(var i=0;i<length-1;i++){
                    html+=arr[i]+"。"+"<br>";
                }
                html+=arr[length-1];
                $("#text1").html(html);
            },
            error:function () {

            }
        })
    })

})